package com.scuec.tourismwebsite.mapper;

import com.scuec.tourismwebsite.entity.Message;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface MessageMapper {
    @Select("SELECT * FROM message")
    List<Message> findAll();

    @Insert("INSERT INTO message (content) VALUES (#{content})")
    @Options(useGeneratedKeys = true, keyProperty = "id")
    void insert(Message message);
}